home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
et
/
tutorial
/
docs.lha
/
documentation
/
app_i.eps
(
.svg
)
< prev
next >
Encapsulated PostScript
|
1993-08-09
|
60KB
|
557x1021
|
8-bit (90 colors)
Labels:
black
|
darkness
OCR:
LösungenzzuzLernabschnittz4 Anhang I:Lernabschnitt:r4nÜbung:ntwoshapes2 Dec 118112:12119911File:twoshapes2.CET++Tutorial Lemabschnitt: 141Beispiel: twoshapes2 Page 11 1111111111 }{ 12 //Lemabschnitt: 14 Beispiel: ttwoshapes2 1111111113 11 1111111114 //11/View with 2 shapes 1111111115 //11Shapes may be moved while Cursor is in Shape and left Mouse Button is pressed 16 //Shape 1s Istretched while Cursor is in Shape and left Mouse Button 1+Cntl key are pressed 1111111117 11 111111118 #include fET++.h" mmmmmm 110 constintcSETINK1=USERCMD¹+1100, tcMAXINKS-150; 11 112 1111111113 static chart aboutMsg-fResize shapes with t@lcntl@Pland@lleft mouse button@P"; 14 static Inkpalette[cMAXINKS]: 1111115 16 SymboltcDocTypeShapes("TWOSHAPES"); 1111111117 118 //---Shape 1111111119 120 class Shape: public Object 1111111121 fint inkid; 122 public: 23 MetaDef(Shape); 1124 25 Shape(Rectangle)t(r) 1111111126 {inkid-13:1 1127 28 Metric GetMinSize() 1111111129 {return Metric(5):1 1111111130 111void Draw(Rectangle) 1111111131 (1GrSetink(palette[inkid]):1 1111111132 void Setink(inthewink) 1111111133 (inkid-thewink; Force Redraw(); 1Changed(): 134 intGetink() 1111111135 {return inkid; 1111111136 11fostream& PrintOn(ostreams) 1111111137 (VObject::PrintOn(s); 1111111138 treturnsk<inkid1SP;1 111111139 tistream& ReadFrom(istream Bs) 1111111140 {Object::ReadFrom(s); 11111141 treturnst>>inkid;1 142 1111111143 144 Metalmpl(Shape, IT(inkid))); 111111145 146 BoxShape1---- 1111111147 148 class BoxShape: public Shape 149 public: 150 MetaDef(BoxShape); 1111111151 111BoxShape(Rectanglet)t Shape(r) 111111152 1111111153 void Draw(Rectanglet) 11111154 155) 11111156 157 Metalmpl0(BoxShape); 1111111158 159 OvalShape1- 111111160 Ch.Frei, H.SchaudtI (1Shape::Draw(r): 1GrFillRect(contentRect):1 Software Schule Schweiz Seite: 1163